<template>
  <div class="my-Product">
    <h1>姓名 <br>{{title}}</h1>
    <h2>售价{{money}}</h2>
    <p>{{info}}</p>

    <button @click="sub" >来</button>
  </div>
</template>

<script>

export default {
 props:['title','money','info','id'],
methods:{
    sub(){
this.$emit('kan', this.id);
    }
}
 
};
</script>

<style  scoped>
.my-Product{
    width: 400px;
    height: 400px;
    border: 2px solid #000;
    border-radius: 5px;
    margin: 100px;
}
</style>